<%= form_for @record, :html => {:class => 'form-horizontal'} do |f| %>
<fieldset>
  <div class="form-group">
    <!--%= f.hidden_field %-->
  </div>
  <div class="form-group">
    <div class="col-sm-6">
      <%= f.label :name %>
      <%= f.text_field :name %>
    </div>
  </div>
  <% if  @entry_type == "incomes" %>
    <%= f.fields_for :entries do |income| %>
      <div class="form-group">
        <!--%= render 'income_entry', :f => income %-->
      </div>
    <% end %>
    <div class="form-group">
      <div class="col-sm-8">
        <%=link_to_add_association "Add Income", f, :entries, :partial => 'income_entry' %>
      </div>
    </div>
  <% end %>
  <% if  @entry_type == "expenses" %>
    <%= f.fields_for :entries do |expense| %>
      <div class="form-group">
        <!--%= render 'expense_entry', :f => expense %-->
      </div>
    <% end %>
    <div class="form-group">
      <div class="col-sm-8">
        <%=link_to_add_association "Add Expense", f, :entries, :partial => 'expense_entry' %>
      </div>
    </div>
  <% end %>
  <div class="form-group">
    <div class="col-sm-6">
      <%= f.submit "Create Record", :class=>"btn btn-lg btn-success" %>
    </div>
  </div>

</fieldset>
<% end %>
